package org.ecc.android.validations.library.validator;

import android.content.Context;

import org.ecc.android.validations.library.ValidationExecutor;

import java.util.regex.Pattern;

/**
 * Created with org.ecc.android.validations.library.validator
 * User:YangXiuFeng
 * Date:2016/1/15
 * Time:9:13
 */
public class BlankValidation extends ValidationExecutor{
    final String reg = "^\\s*$";
    @Override
    public boolean doValidate(Context context, String text) {
        if (Pattern.compile(reg).matcher(text).find()){
            return true;
        }
        return false;
    }
}
